﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>MonitorGetName - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The MonitorGetName function returns the operating system's name of the specified monitor." />
<meta name="ahk:equiv-v1" content="commands/SysGet.htm#MonitorName" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>MonitorGetName</h1>

<p>返回指定监视器的操作系统名称.</p>

<pre class="Syntax">Name := <span class="func">MonitorGetName</span>(<span class="optional">N</span>)</pre>

<h2 id="Parameters">参数</h2>
<dl>
    <dt>N</dt>
    <dd>
        <p>类型: <a href="../Concepts.htm#numbers">整数</a></p>
        <p>监视器编号, 介于 1 和 <a href="MonitorGetCount.htm">MonitorGetCount</a> 返回的数字之间. 如果省略, 则使用主监视器.</p>
    </dd>
</dl>

<h2 id="Return_Value">返回值</h2>
<p>类型: <a href="../Concepts.htm#strings">字符串</a></p>
<p>此函数返回指定监视器的操作系统名称.</p>

<h2 id="Error_Handling">错误处理</h2>
<p>失败时抛出异常.</p>

<h2 id="Related">相关</h2>
<p><a href="SysGet.htm">SysGet</a>, <a href="Monitor.htm">Monitor functions</a></p>

<h2 id="Examples">示例</h2>
<p>有关此函数的演示, 请参阅<a href="Monitor.htm">监视器函数</a>页面的<a href="Monitor.htm#ExLoopAll">示例 #1</a>.</p>

</body>
</html>